import pandas as pd
import time
from math import radians, cos, sin, asin, sqrt
import csv
s_time=time.time()
time=(s_time+8*3600)/86400+70*365+19
print(time)
# t_tamp = 1462451334

#显示所有列
pd.set_option('display.max_columns', None)
#显示所有行
pd.set_option('display.max_rows', None)
#
data = pd.read_csv('gps_20161001', sep = ',', header = None, names = ['DriverID', 'OrderID', 'timestamp','longitude','dimensionality'])
# print(data.head(10))
print(data.head(10))
d=data.groupby(['DriverID','OrderID'])

print(d.head(10))


D=d.min().reset_index()
D.to_csv('../Data/xian/Mintime',sep='\t',header=False,index=None)

print(D.head(10))

W=d.max().reset_index()
W.to_csv('../Data/xian/Maxtime',sep='\t',header=False,index=None)

print(W.head(10))